#include <QDialog>

#include "degreedialog.h"

DegreeDialog::DegreeDialog(QWidget *parent) :
    QDialog(parent)
{
    setupUi(this);
}

DegreeDialog::~DegreeDialog()
{
}

void DegreeDialog::on_reduceButton_clicked()
{
    int degree;
    DegreeReductionMethod method;

    if ( simpleRadio->isChecked( ) )
        method = Simple;
    else if ( hermiteRadio->isChecked( ) )
        method = Hermite;
    else if ( approxRadio->isChecked( ) )
        method = Approx;
    else if ( lwRadio->isChecked( ) )
        method = LewanowiczWozny;
    else
        method = ReductionError;

    degree = degreeSpinBox -> value( );

    emit reduceDegree( method, degree );
}
